package cn.easybuy.utils;

import java.util.*;
import java.io.*;

public class ConfigManager {
	private static Properties props=null;
	static{
		InputStream is=null;
		is=ConfigManager.class.getClassLoader().
				getResourceAsStream("database.properties");
		if (is==null){
			throw new RuntimeException("找不到文件");
		}
		props=new Properties();
		try {
			props.load(is);
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				is.close();
			} catch (IOException e2) {
				e2.printStackTrace();
			}
		}
	}
	public static String getProperty(String key) {
		return props.getProperty(key);
	}
}
